<body class="inside-header inside-aside is-dialog">
    <div id="main" role="main">
        <div class="tab-content tab-addtabs">
            <div id="content">
                <div class="row">
                    <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
                        <section class="content-header hide">
                            <h1>
                                控制台 <small>Control panel</small>
                            </h1>
                        </section>
                        <div class="content">
                            <form id="edit-form" class="form-horizontal form-ajax" role="form" data-toggle="validator" method="POST" action="">
                                <div class="form-group">
                                    <label for="role_id" class="control-label col-xs-12 col-sm-2">角色组:</label>
                                    <div class="col-xs-12 col-sm-8">
                                        <select class="form-control selectpicker" name="row[role_id]">
                                            <option value="0">请选择</option>
                                            <?php foreach($role as $v):?>
                                            <option value="<?=$v['id']?>" <?php if($row['role_id'] == $v['id']):?>selected<?php endif;?>> <?=$v['name']?></option>
                                            <?php endforeach;?>
                                        </select> </div>
                                </div>
                                <div class="form-group">
                                    <label for="username" class="control-label col-xs-12 col-sm-2">用户名:</label>
                                    <div class="col-xs-12 col-sm-8">
                                        <input type="text" class="form-control" id="username" name="row[username]" value="<?=$row['username']?>" data-rule="required;username" />
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="mobile" class="control-label col-xs-12 col-sm-2">手机号:</label>
                                    <div class="col-xs-12 col-sm-8">
                                        <input type="mobile" class="form-control" id="mobile" name="row[mobile]" value="<?=$row['mobile']?>" data-rule="mobile" />
                                    </div>
                                </div>
                                <!-- <div class="form-group">
                                    <label for="email" class="control-label col-xs-12 col-sm-2">Email:</label>
                                    <div class="col-xs-12 col-sm-8">
                                        <input type="email" class="form-control" id="email" name="row[email]" value="<?=$row['email']?>" data-rule="email" />
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="nickname" class="control-label col-xs-12 col-sm-2">昵称:</label>
                                    <div class="col-xs-12 col-sm-8">
                                        <input type="text" class="form-control" id="nickname" name="row[nickname]" value="<?=$row['nickname']?>" data-rule="" />
                                    </div>
                                </div> -->
                                <div class="form-group">
                                    <label for="password" class="control-label col-xs-12 col-sm-2">密码:</label>
                                    <div class="col-xs-12 col-sm-8">
                                        <input type="password" class="form-control" id="password" name="row[password]" value="" <?php if($row['id']):?>placeholder="不修改密码请留空" <?php else:?>data-rule="required;password" <?php endif;?> />
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="c-status" class="control-label col-xs-12 col-sm-2">状态:</label>
                                    <div class="col-xs-12 col-sm-8">
                                        <label for="row[status]-normal">
                                            <input id="row[status]-normal" name="row[status]" type="radio" value="1" <?php if(!isset($row['status']) || $row['status'] == 1):?>checked<?php endif;?>> 正常
                                        </label>
                                        <label for="row[status]-hidden">
                                            <input id="row[status]-hidden" name="row[status]" type="radio" value="0" <?php if(isset($row['status']) && $row['status'] == 0):?>checked<?php endif;?>> 禁用
                                        </label>
                                    </div>
                                </div>
                                <div class="form-group hidden layer-footer">
                                    <label class="control-label col-xs-12 col-sm-2"></label>
                                    <div class="col-xs-12 col-sm-8">
                                        <button type="submit" class="btn btn-success btn-embossed">确定</button>
                                        <button type="reset" class="btn btn-default btn-embossed">重置</button>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>